$.fn.basicTabModernSetIdx = function(a) {
    var c, d, e, f, g, h, i, b = $(this);
    if (1 == b.attr("iframeMode") || "true" == b.attr("iframeMode")) {
        if (d = b.find("a").eq(a), e = b.data("data"), !e) return;
        f = "list", b.attr("dataRoot") && (f = b.attr("dataRoot")), g = e[f] ? e[f] : e, 
        c = g.length, h = b.find(".basicTabModern_con").eq(0).find("iframe").eq(0), h.attr("src", g[a].url), 
        d.prevAll("a").find("li").removeClass("basicTabModern_current_center"), d.nextAll("a").find("li").removeClass("basicTabModern_current_center"), 
        d.find("li").addClass("basicTabModern_current_center"), i = d.parent().find("li").eq(0), 
        0 != a ? (i.addClass("basicTabModern_normal_left_fix"), d.prev().addClass("basicTabModern_current_left_fix")) : (i.removeClass("basicTabModern_normal_left_fix"), 
        d.prev().removeClass("basicTabModern_current_left_fix"));
    } else d = b.find(".basicTabModern_normal_center").eq(a), c = b.find(".basicTabModern_con").length, 
    b.find(".basicTabModern_con").hide(), b.find(".basicTabModern_con").eq(a).fadeIn(), 
    d.prevAll("li").removeClass("basicTabModern_current_center"), d.nextAll("li").removeClass("basicTabModern_current_center"), 
    d.addClass("basicTabModern_current_center"), i = d.parent().find("li").eq(0), 0 != a ? (i.addClass("basicTabModern_normal_left_fix"), 
    d.prev().addClass("basicTabModern_current_left_fix")) : (i.removeClass("basicTabModern_normal_left_fix"), 
    d.prev().removeClass("basicTabModern_current_left_fix"));
    d.prevAll("li").removeClass("basicTabModern_current_left"), d.prevAll("li").removeClass("basicTabModern_current_right"), 
    d.nextAll("li").removeClass("basicTabModern_current_left"), d.nextAll("li").removeClass("basicTabModern_current_right"), 
    d.prev().addClass("basicTabModern_current_left"), d.next().addClass("basicTabModern_current_right"), 
    b.trigger("actived", a), b.attr("selectedIdx", a);
}, $.fn.basicTabModernSetEnable = function(a, b) {
    var d, e, f, g, h, c = $(this);
    if (1 == c.attr("iframeMode") || "true" == c.attr("iframeMode")) {
        if (f = c.data("data"), !f) return;
        g = "list", c.attr("dataRoot") && (g = c.attr("dataRoot")), h = f[g] ? f[g] : f, 
        d = h.length, e = c.find("a").eq(a), 1 == b ? (e.find("li").removeClass("disabled"), 
        e.bideClickIframe(!0, c, a, d)) : (e.find("li").addClass("disabled"), e.bideClickIframe(!1, c, a, d));
    } else d = c.find(".basicTabModern_con").length, e = c.find(".basicTabModern_normal_center").eq(a), 
    1 == b ? (e.removeClass("disabled"), e.bideClick(!0, c, a, d)) : (e.addClass("disabled"), 
    e.bideClick(!1, c, a, d));
}, $.fn.basicTabModernRender = function() {
    function A(a) {
        var b, j;
        a && (b = a[s] ? a[s] : a, i = b.length, j = "", "none" == h.attr("startSlection") && (j = "none"), 
        $.each(b, function(a, b) {
            var l, m, r, s, t, u, v, k = uncompile(quiLanguage.basicTab.tabName);
            b.name && (k = b.name), n == a && b.url && q.attr("src", b.url), l = $('<li class="basicTabModern_normal_left"></li>'), 
            d.append(l), 0 == a && 0 != n && l.addClass("basicTabModern_normal_left_fix"), n == a && "none" != j && (l.addClass("basicTabModern_current_left"), 
            0 != n && l.addClass("basicTabModern_current_left_fix")), m = $('<li class="basicTabModern_normal_center"></li>'), 
            r = $("<a></a>"), null != b.url && r.attr("href", b.url), null != p && r.attr("target", p), 
            b.iconClass ? (s = b.iconClass, t = $("<span></span>"), t.addClass(s), t.text(k), 
            m.append(t)) : m.text(k), r.append(m), d.append(r), o || m.addClass("disabled"), 
            u = !0, b.itemDisabled && ("true" == b.itemDisabled || 1 == b.itemDisabled) && (m.addClass("disabled"), 
            u = !1), m.data("idx", a), n == a && "none" != j && m.addClass("basicTabModern_current_center"), 
            v = $('<li class="basicTabModern_normal_right"></li>'), d.append(v), n == a && "none" != j && v.addClass("basicTabModern_current_right"), 
            o && u ? r.bideClickIframe(!0, h, a, i) : r.bideClickIframe(!1, h, a, i), ("true" == h.attr("tabScroll") || 1 == h.attr("tabScroll")) && setTimeout(function() {
                c = c + l.outerWidth() + m.outerWidth() + v.outerWidth(), g = h.outerWidth(), c > g && (d.css("left", 24), 
                e.fadeIn(200), f.fadeIn(200));
            }, 500);
        }));
    }
    var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, w, x, y, z;
    if ($(this).find(".basicTabModern_top").remove(), a = 2, c = 0, g = 0, h = $(this), 
    j = !1, (1 == h.attr("showName") || "true" == h.attr("showName")) && (j = !0), h.attr("tabTitle") ? (k = $('<div class="basicTabModern_top"><div class="basicTabModern_top_left"><div class="basicTabModern_top_right"><span class="basicTabModern_title"></span><div class="basicTabModern_tabcon"></div><div class="clear"></div></div></div></div>'), 
    l = k.find(".basicTabModern_tabcon"), m = k.find(".basicTabModern_title"), m.html(h.attr("tabTitle")), 
    null != h.attr("iconClass") ? (m.addClass(h.attr("iconClass")), m.css({
        backgroundPosition: "0 60%"
    })) : null != h.attr("iconSrc") && m.css({
        backgroundImage: "url(" + $(this).attr("iconSrc") + ")",
        backgroundRepeat: "no-repeat",
        backgroundPosition: "0 60%",
        display: "block",
        paddingLeft: "18px"
    }), k.find(".basicTabModern_top_right").css("paddingLeft", "10px")) : (k = $('<div class="basicTabModern_top"><div class="basicTabModern_top_left"><div class="basicTabModern_top_right"></div></div></div>'), 
    l = k.find(".basicTabModern_top_right")), "true" == h.attr("tabScroll") || 1 == h.attr("tabScroll") ? (d = $('<div class="basicTabModern_top_Container"></div>'), 
    e = $('<div class="basicTabModern_tabButtonLeft" style="display:none;"></div>'), 
    f = $('<div class="basicTabModern_tabButtonRight" style="display:none;"></div>'), 
    l.append(d), l.append(e), l.append(f), g = l.width(), $(window).bind("resize", function() {
        g = l.width(), c > g && (a = 24, d.css("left", a), e.fadeIn(200), f.fadeIn(200)), 
        g > c + 8 && (a = 2, d.css("left", a), e.fadeOut(200), f.fadeOut(200));
    }), e.bind("mousedown", function() {
        g = l.width(), b = setInterval(function() {
            return a > 16 ? (a = 16, clearInterval(b), void 0) : (a += 8, d.css("left", a), 
            void 0);
        }, 30);
    }), e.bind("mouseup", function() {
        clearInterval(b);
    }), f.bind("mousedown", function() {
        g = l.width(), b = setInterval(function() {
            return a > 16 ? (a = 16, clearInterval(b), void 0) : g - c > a ? (a = g - c, clearInterval(b), 
            void 0) : (a -= 8, d.css("left", a), void 0);
        }, 30);
    }), f.bind("mouseup", function() {
        clearInterval(b);
    })) : d = l, n = 0, h.attr("selectedIdx") ? n = Number(h.attr("selectedIdx")) : h.attr("selectedIdx", 0), 
    o = !0, (1 == h.attr("allItemDisabled") || "true" == h.attr("allItemDisabled")) && (o = !1), 
    p = null, r = !1, (1 == h.attr("showProgress") || "true" == h.attr("showProgress")) && (r = !0), 
    1 == h.attr("iframeMode") || "true" == h.attr("iframeMode") || 1 == h.attr("singleContentMode") || "true" == h.attr("singleContentMode")) {
        if (h.find(">div").length > 1 && alert(uncompile(quiLanguage.basicTab.errorMessage)), 
        h.find(">div").addClass("basicTabModern_con"), h.find(">div").css({
            overflowX: "hidden",
            overflowY: "auto"
        }), q = h.find(">div").eq(0).find("iframe").eq(0), q.attr("name") && (p = q.attr("name")), 
        s = "list", h.attr("dataRoot") && (s = h.attr("dataRoot")), t = h.attr("params")) try {
            u = JSON.parse(t);
        } catch (v) {
            u = "", alert(uncompile(quiLanguage.basicTab.paramErrorMessage));
        } else u = "";
        if (w = "", x = h.attr("url"), y = h.attr("data"), z = h.data("data")) A(z); else if (y) {
            try {
                w = JSON.parse(y);
            } catch (v) {
                w = "", alert(uncompile(quiLanguage.basicTab.dataErrorMessage));
            }
            h.data("data", w), A(w);
        } else x && $.ajax({
            url: h.attr("url"),
            dataType: "json",
            data: u,
            error: function() {
                alert(uncompile(quiLanguage.basicTab.urlErrorMessage));
            },
            success: function(a) {
                h.data("data", a), w = a, A(a);
            }
        });
    } else i = h.find(">div").length, h.find(">div").each(function(a) {
        var j, k, l, m, p, q, r, s, t, b = uncompile(quiLanguage.basicTab.tabName);
        $(this).attr("name") && (b = $(this).attr("name")), $(this).addClass("basicTabModern_con"), 
        n != a && $(this).hide(), j = $('<li class="basicTabModern_normal_left"></li>'), 
        d.append(j), 0 == a && 0 != n && j.addClass("basicTabModern_normal_left_fix"), n == a && (j.addClass("basicTabModern_current_left"), 
        0 != n && j.addClass("basicTabModern_current_left_fix")), k = $('<li class="basicTabModern_normal_center"></li>'), 
        d.append(k), $(this).attr("iconClass") ? (l = $(this).attr("iconClass"), m = $("<span></span>"), 
        m.addClass(l), m.text(b), k.append(m)) : k.text(b), k.data("idx", a), o || k.addClass("disabled"), 
        p = !0, ("true" == $(this).attr("itemDisabled") || 1 == $(this).attr("itemDisabled")) && (k.addClass("disabled"), 
        p = !1), n == a && k.addClass("basicTabModern_current_center"), q = $('<li class="basicTabModern_normal_right"></li>'), 
        d.append(q), n == a && q.addClass("basicTabModern_current_right"), 1 == i ? (k.css("cursor", "default"), 
        null != h.attr("tabSubTitle") && (r = $("<div></div>"), r.html(h.attr("tabSubTitle")), 
        r.addClass("basicTabModern_subTitle"), q.after(r)), null != h.attr("statusText") && (s = $("<div></div>"), 
        null != h.attr("tabUrl") ? (t = $("<a></a>"), t.html(h.attr("statusText")), t.attr("href", h.attr("tabUrl")), 
        null != h.attr("tabTarget") && t.attr("target", h.attr("tabTarget")), s.append(t)) : s.html(h.attr("statusText")), 
        s.addClass("basicTabModern_status"), d.append(s))) : o && p && (1 == h.attr("hoverMode") || "true" == h.attr("hoverMode") ? k.bideOver(!0, h, a, i) : k.bideClick(!0, h, a, i)), 
        ("true" == h.attr("tabScroll") || 1 == h.attr("tabScroll")) && setTimeout(function() {
            c = c + j.outerWidth() + k.outerWidth() + q.outerWidth(), g = h.outerWidth(), c > g && (d.css("left", 24), 
            e.fadeIn(200), f.fadeIn(200));
        }, 500);
    });
    l.append($('<div class="clear"></div>')), h.prepend(k);
}, $.fn.bideClick = function(a, b, c) {
    var e = $(this);
    e.unbind("click"), a && e.bind("click", {}, function() {
        b.find(".basicTabModern_con").hide(), b.find(".basicTabModern_con").eq(c).fadeIn(), 
        $(this).prevAll("li").removeClass("basicTabModern_current_left"), $(this).prevAll("li").removeClass("basicTabModern_current_center"), 
        $(this).prevAll("li").removeClass("basicTabModern_current_right"), $(this).nextAll("li").removeClass("basicTabModern_current_left"), 
        $(this).nextAll("li").removeClass("basicTabModern_current_center"), $(this).nextAll("li").removeClass("basicTabModern_current_right"), 
        $(this).addClass("basicTabModern_current_center"), $(this).prev().addClass("basicTabModern_current_left"), 
        $(this).next().addClass("basicTabModern_current_right"), b.trigger("actived", c), 
        b.attr("selectedIdx", c);
        var a = $(this).parent().find("li").eq(0);
        0 != c ? (a.addClass("basicTabModern_normal_left_fix"), $(this).prev().addClass("basicTabModern_current_left_fix")) : (a.removeClass("basicTabModern_normal_left_fix"), 
        $(this).prev().removeClass("basicTabModern_current_left_fix"));
    });
}, $.fn.bideOver = function(a, b, c) {
    var e = $(this);
    e.unbind("mouseover"), a && e.bind("mouseover", {}, function() {
        b.find(".basicTabModern_con").hide(), b.find(".basicTabModern_con").eq(c).fadeIn(), 
        $(this).prevAll("li").removeClass("basicTabModern_current_left"), $(this).prevAll("li").removeClass("basicTabModern_current_center"), 
        $(this).prevAll("li").removeClass("basicTabModern_current_right"), $(this).nextAll("li").removeClass("basicTabModern_current_left"), 
        $(this).nextAll("li").removeClass("basicTabModern_current_center"), $(this).nextAll("li").removeClass("basicTabModern_current_right"), 
        $(this).addClass("basicTabModern_current_center"), $(this).prev().addClass("basicTabModern_current_left"), 
        $(this).next().addClass("basicTabModern_current_right"), b.trigger("actived", c), 
        b.attr("selectedIdx", c);
        var a = $(this).parent().find("li").eq(0);
        0 != c ? (a.addClass("basicTabModern_normal_left_fix"), $(this).prev().addClass("basicTabModern_current_left_fix")) : (a.removeClass("basicTabModern_normal_left_fix"), 
        $(this).prev().removeClass("basicTabModern_current_left_fix"));
    });
}, $.fn.bideClickIframe = function(a, b, c) {
    var e = $(this);
    e.unbind("click"), a ? e.bind("click", {}, function() {
        if ($(this).prevAll("li").removeClass("basicTabModern_current_left"), $(this).prevAll("li").removeClass("basicTabModern_current_right"), 
        $(this).prevAll("a").find("li").removeClass("basicTabModern_current_center"), $(this).nextAll("li").removeClass("basicTabModern_current_left"), 
        $(this).nextAll("li").removeClass("basicTabModern_current_right"), $(this).nextAll("a").find("li").removeClass("basicTabModern_current_center"), 
        $(this).find("li").addClass("basicTabModern_current_center"), $(this).prev().addClass("basicTabModern_current_left"), 
        $(this).next().addClass("basicTabModern_current_right"), "true" == b.attr("showProgress") || 1 == b.attr("showProgress")) try {
            showProgressBar();
        } catch (a) {}
        b.trigger("actived", c), b.attr("selectedIdx", c);
        var d = $(this).parent().find("li").eq(0);
        0 != c ? (d.addClass("basicTabModern_normal_left_fix"), $(this).prev().addClass("basicTabModern_current_left_fix")) : (d.removeClass("basicTabModern_normal_left_fix"), 
        $(this).prev().eq(0).removeClass("basicTabModern_current_left_fix"));
    }) : e.bind("click", {}, function() {
        return !1;
    });
};